Type Inference for Objects with Base Types

نویسندگان

  • Francis Tang
  • Martin Hofmann
چکیده

We present a type inference algorithm for the underlying language and type system of a logic (AL [2]) of Abadi and Leino. We approach the problem by following the techniques used by Palsberg and his coauthors [7, 9] whereby, using a language-based representation of types, we construct an automaton to recognise a least-shape type derivation. To overcome technical problems caused in part by the weaker subtype relation and base types, we introduce a generalisation of types which we term pretypes. As a pleasant consequence, pretypes give rise to a natural notion of presolution which allow us to give a cleaner characterisation of least-shape type derivation.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Extending the Qualitative Trajectory Calculus Based on the Concept of Accessibility of Moving Objects in the Paths

Qualitative spatial representation and reasoning are among the important capabilities in intelligent geospatial information system development. Although a large contribution to the study of moving objects has been attributed to the quantitative use and analysis of data, such calculations are ineffective when there is little inaccurate data on position and geometry or when explicitly explaining ...

متن کامل

Type inference for recursively constrained types and its application to OOP

We de ne a powerful type inference mechanism with application to object oriented programming The types inferred are recursively constrained types types that come with a system of constraints These types may be viewed as generalizations of recur sive types and F bounded polymorphic types the forms of type that are necessary to properly encode object typings The base language we study I Soop inco...

متن کامل

Type Inference for Scripting language with Implicit Extension

This paper presents a constraint-based type inference algorithm for a subset of the JavaScript language. The goal is to prevent accessing undefined members of objects. We define a type system that allows explicit extension of objects through add operation and implicit extension through method calls. We prove that a program is typable if and only if we can infer its types. We also extend the typ...

متن کامل

Type Inference for Scripting languages with Implicit Extension

This paper presents a constraint-based type inference algorithm fora subset of the JavaScript language. The goal is to prevent accessingundefined members of objects. We define a type system that allowsexplicit extension of objects through add operation and implicitextension through method calls. We prove that a program is typableif and only if we can infer its types. We also...

متن کامل

Type Inference for Static Compilation of JavaScript (Extended Version)

We present a type system and inference algorithm for a rich subset of JavaScript equipped with objects, structural subtyping, prototype inheritance, and first-class methods. The type system supports abstract and recursive objects, and is expressive enough to accommodate several standard benchmarks with only minor workarounds. The invariants enforced by the types enable an ahead-of-time compiler...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2001